-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
umu-launcher[-unwrapped]: init at 1.1.4 #369259
Conversation
Oh yeah, the build fails because of #366359, I've been working on this with |
ccb8609
to
6972537
Compare
6972537
to
42fdf85
Compare
73f963a
to
9257d01
Compare
pkgs/by-name/um/umu-launcher-unwrapped/makefile-installer-prefix.patch
Outdated
Show resolved
Hide resolved
instead of saying this type of stuff why don't you tell me what are your complaints and actually make an improvement |
Sorry. The improvement is this package, since I saw more value in upstreaming a proper package to nixpkgs compared to fixing the problems in the flake. |
On another note, @MattSturgeon please mark the threads as resolved if they are. Also, should I add you and @beh-10257 as maintainers to the package (assuming you're already in the maintainers list)? |
the flake is always gonna be more up to date so there is value in that |
I don't have permission to do that. I think as PR author you can? Otherwise someone with write-access must do it. |
Huh? You should be able to resolve your own reviews. Well in that case, do you want to add anything else or can I resolve them? |
@beh-10257 most of them you can get by replacing the package definitions entirely with the ones from this PR, while adapting them for the flake (make sure to tell me about anything that's missing from the packages in this PR along with a good reasoning as well, so I can add them too; eg. optional dependencies, since I couldn't find anything about those, but I did see some in the Nix package). Once you do that, I'll PR the rest of my suggestions, since that's easier than explaining. |
From Resolving conversations:
Most of my threads were more discussion than feedback. If you feel that they are resolved, then feel free to mark as such.
I agree it'd be nice if the flake and nixpkgs were kept in sync. This will likely need breaking changes though. One way that could be done would be to have the flake base itself on the nixpkgs impl, simply overriding # flake outputs
{
overlays.default = final: prev: {
umu-launcher-unwrapped = prev.umu-launcher-unwrapped.overrideAttrs (old: {
# TODO: would be nice to filter out irrelevant dirs,
# to avoid them invalidating build caches
# e.g. using filesets
src = ../../.;
# TODO: version should also be something sensible
version = "?";
});
};
} One way to avoid that being an invisibly breaking change, would be to add a new By keeping the old flake at its existing location (with a warning), users would have time to migrate to the new flake at the new location. That way a) end-users don't need |
Not needing |
This comment was marked as resolved.
This comment was marked as resolved.
Please add me to the maintainers list as well (fuzen) |
Added the 2 of you, but I couldn't find @beh-10257 |
@@ -0,0 +1,15 @@ | |||
{ buildFHSEnv, umu-launcher-unwrapped }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth copying heroic
nixpkgs/pkgs/games/heroic/fhsenv.nix
Lines 4 to 5 in 235caa7
extraPkgs ? pkgs: [ ], | |
extraLibraries ? pkgs: [ ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it easier for end-users to add extra packages to the FHS environment by overriding.
This could be done in a follow-up PR if preferred
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I what the code does, but in what scenario would that be useful
I assume heroic launcher also supports native games, in which case it would make sense, but as far as I know, umu is for windows games only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for passing graphics and fixing a cursor issue. Graphics is needed for dxvk-nvapi to work
nixpkgs/nixos/modules/programs/steam.nix
Lines 51 to 57 in e24b4c0
extraLibraries = pkgs: let | |
prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ]; | |
additionalLibs = with config.hardware.graphics; | |
if pkgs.stdenv.hostPlatform.is64bit | |
then [ package ] ++ extraPackages | |
else [ package32 ] ++ extraPackages32; | |
in prevLibs ++ additionalLibs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, I feel like these make more sense to be done with overrides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m pretty new to nixpkgs and all but I’m going to second @LovingMelody on this one, I think adding the options to enable easier overrides would be a good thing, particularly since I suspect that will be something done often as shown with steam there. As mentioned though having it be in a separate PR is fine I think.
Fixed formatting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkgs/by-name/um/umu-launcher-unwrapped/no-umu-version-json.patch
Outdated
Show resolved
Hide resolved
It seems they aren't in the list. It'd be great to have them, but they'll have to do that themselves in a follow up PR. @beh-10257 see the relevant documentation:
|
64fef4c
to
be2f0c5
Compare
Sigh... that should be fine for the remaining reviews. I'm not willing to add the extra* stuff however, unless another another committer wants them, as I really don't think they make sense, when they are only required for workarounds (that can also just as easily be done with overrideAttrs). |
@MattSturgeon does that look ok? |
# Ideally, a change should be upstreamed, that adds both arguments | ||
# if their respective variables are set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Ideally, a change should be upstreamed, that adds both arguments | |
# if their respective variables are set. | |
# See https://github.com/Open-Wine-Components/umu-launcher/pull/343 |
I've opened an upstream PR, so let's link to it 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's merged now, so we can safely use fetchpatch2
:
diff --git a/pkgs/by-name/um/umu-launcher-unwrapped/makefile-installer-prefix.patch b/pkgs/by-name/um/umu-launcher-unwrapped/makefile-installer-prefix.patch
deleted file mode 100644
index 890d6537e33c..000000000000
--- a/pkgs/by-name/um/umu-launcher-unwrapped/makefile-installer-prefix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index b82053d..3e4379e 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -90,7 +90,7 @@ umu-dist: $(OBJDIR)/.build-umu-dist
- umu-dist-install: umu-dist
- $(info :: Installing umu )
- install -d $(DESTDIR)$(PYTHONDIR)/$(INSTALLDIR)
-- $(PYTHON_INTERPRETER) -m installer --destdir=$(DESTDIR) $(OBJDIR)/*.whl
-+ $(PYTHON_INTERPRETER) -m installer --prefix=$(PREFIX) $(OBJDIR)/*.whl
-
- ifeq ($(FLATPAK), xtrue)
- umu-install: version-install umu-dist-install
diff --git a/pkgs/by-name/um/umu-launcher-unwrapped/package.nix b/pkgs/by-name/um/umu-launcher-unwrapped/package.nix
index 357ef7a5d806..1f97d0c31580 100644
--- a/pkgs/by-name/um/umu-launcher-unwrapped/package.nix
+++ b/pkgs/by-name/um/umu-launcher-unwrapped/package.nix
@@ -1,6 +1,7 @@
{
python3Packages,
fetchFromGitHub,
+ fetchpatch2,
lib,
bash,
hatch,
@@ -22,10 +23,12 @@ python3Packages.buildPythonPackage rec {
# This should fail, and be removed for releases after 1.1.4,
# see https://github.com/Open-Wine-Components/umu-launcher/pull/289
(replaceVars ./no-umu-version-json.patch { inherit version; })
- # Patch the python installer call to use --prefix instead of --destdir
- # Ideally, a change should be upstreamed, that adds both arguments
- # if their respective variables are set.
- ./makefile-installer-prefix.patch
+ # Patch the python installer call to support PREFIX
+ # see https://github.com/Open-Wine-Components/umu-launcher/pull/343
+ (fetchpatch2 {
+ url = "https://github.com/Open-Wine-Components/umu-launcher/pull/343.diff";
+ hash = "sha256-+h0ao2WUVUUR/AHEtGj5IAIUVivfAc+asnr0632hN74=";
+ })
];
nativeBuildInputs = [
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installed & tested locally, seems to be working.
Thanks for your efforts on this!
This comment was marked as outdated.
This comment was marked as outdated.
Test out the nixpkgs PR instead of using the upstream flake NixOS/nixpkgs#369259
|
Thanks |
Closes #297662
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.